package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.approval.vo.UserApproAllInfoVO;
import org.jsola.core.Result;
import org.jsola.hr.vo.EmpAndApproInfoVO;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author june
 */
@Api(tags = "hrApproval-人力审批接口")
public interface IHrApproProviderControllerAPI {

    /**
     * 根据用户审批id获取用户审批详情(包含申请信息及表单填写信息)
     *
     * @param userApproId 用户审批表id
     * @return 用户审批详情
     */
    @ApiOperation(value = "根据用户审批id获取用户审批详情(包含申请信息及表单填写信息)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "用户审批申请表id", value = "userApproId", required = true, dataType = "String", paramType = "path")
    })
    Result<UserApproAllInfoVO> findUserApproDetailsById(
            @PathVariable(value = "userApproId") String userApproId
    );

    /**
     * 根据业务获取员工的审批信息
     *
     * @param subjectType 业务类型
     * @param subjectId   业务id
     * @return 员工审批详情
     */
    @ApiOperation(value = "根据业务类型,业务id获取员工的审批信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "业务类型", value = "subjectType", required = true, dataType = "String", paramType = "path"),
            @ApiImplicitParam(name = "业务id(员工的业务就是员工id)", value = "subjectId", required = true, dataType = "String", paramType = "path")
    })
    Result<EmpAndApproInfoVO> findEmpApproDetailsBySubject(
            @PathVariable(value = "subject_type") String subjectType,
            @PathVariable(value = "subject_id") String subjectId
    );

}

